home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacApp Release 10 / MacApp Release 10 - HD Ready / Libraries / Mail / Includes / UMailerView.h < prev    next >
Encoding:
Text File  |  1996-04-03  |  3.6 KB  |  158 lines  |  [TEXT/MPS ]

  1. // UMailerView.h
  2. // Copyright © 1984-96 by Apple Computer, Inc. All rights reserved.
  3.  
  4.  
  5. #ifndef __UMAILERVIEW__
  6. #define __UMAILERVIEW__
  7.  
  8. #if qPowerTalk
  9.  
  10. // MacApp
  11.  
  12. #ifndef __UTABBEHAVIORS__
  13. #include "UTabBehaviors.h"
  14. #endif
  15.  
  16. #ifndef __UVIEW__
  17. #include "UView.h"
  18. #endif
  19.  
  20. // Toolbox
  21.  
  22. #ifndef __OCESTANDARDMAIL__
  23. #include <OCEStandardMail.h>
  24. #endif
  25.  
  26. class TLetter;
  27.  
  28. //----------------------------------------------------------------------------------------
  29. // Constants
  30. //----------------------------------------------------------------------------------------
  31.  
  32. const IDType kMailerViewID = 'MAIL';
  33.  
  34. const Boolean kExpanded = TRUE;
  35. const Boolean kContracted = FALSE;
  36.  
  37. const Boolean kCanContract = TRUE;
  38. const Boolean kCannotContract = FALSE;
  39.  
  40. //----------------------------------------------------------------------------------------
  41. // TMailerView
  42. //----------------------------------------------------------------------------------------
  43.  
  44. // View that holds the SMP Mailer. Handles events for the mailer that were not handled in
  45. // TApplication::DoMailerEvent.
  46.  
  47. class TMailerView : public TView
  48. {
  49.  
  50.     MA_DECLARE_CLASS;
  51.  
  52. public:
  53.     TLetter* fLetter;
  54.     SMPMailerComponent fLastTargetField;
  55.     Boolean fMailerExpanded;
  56.     Boolean fMailerClosed;
  57.  
  58.     TMailerView();
  59.     virtual ~TMailerView();
  60.         // Destructor
  61.     
  62.     void Activate(Boolean entering);
  63.  
  64.     void IMailerView(TLetter* itsLetter,
  65.                      TView* itsSuperView,
  66.                      Boolean initiallyExpanded);
  67.  
  68.     virtual void OpenNewMailer(Boolean initiallyExpanded,
  69.                                    Boolean canContract);
  70.  
  71.     virtual void OpenOldMailer(LetterDescriptor theDesc,
  72.                                    Boolean initiallyExpanded,
  73.                                    Boolean canContract);
  74.  
  75.     virtual void OpenReplyMailer(WindowRef theReplyToWindow,
  76.                                  Boolean replyToAll,
  77.                                  Boolean initiallyExpanded,
  78.                                  Boolean canContract);
  79.  
  80.     virtual void Draw(const VRect& area); // Override
  81.  
  82.     virtual void Close(); // Override
  83.  
  84.     virtual void BecameTarget(); // Override
  85.  
  86.     virtual void ResignedTarget(); // Override
  87.  
  88.     virtual void ExpandMailer();
  89.  
  90.     virtual void ContractMailer();
  91.  
  92.     static CPoint GetDimensions(Boolean expanded);
  93.     
  94.     virtual void DoSetupMenus(); // Override
  95.  
  96.     virtual void DoMenuCommand(CommandNumber aCommandNumber); // Override
  97.  
  98.     virtual void DoMouseCommand(VPoint& theMouse,
  99.                                 TToolboxEvent* event,
  100.                                 CPoint hysteresis); // Override
  101.  
  102.     virtual void DoMouseUp(VPoint& theMouse,
  103.                           TToolboxEvent* event,
  104.                            CPoint hysteresis); // Override
  105.  
  106.     virtual void DoKeyEvent(TToolboxEvent* event); // Override
  107.  
  108.     virtual void DoKeyUp(TToolboxEvent* event);    // Override
  109.  
  110.  
  111.     virtual void DoMailerEvent(TToolboxEvent* event);
  112.     
  113.     virtual void InvalidateFrameDifference(    const VRect& oldFrame, 
  114.                                             const VRect& newFrame); // Override
  115.                                             
  116.     virtual Boolean WantsToBeTarget();  // Override
  117.     
  118.     virtual Boolean WantsToBeTabTarget();
  119. };
  120.  
  121. //----------------------------------------------------------------------------------------
  122. // TLetterTabber
  123. //----------------------------------------------------------------------------------------
  124.  
  125. class TLetterTabber : public TViewTabber
  126. {
  127.     MA_DECLARE_CLASS;
  128.     
  129. protected:
  130.     TLetter*     fLetter;
  131.  
  132. public:
  133.     TLetterTabber();
  134.         // Default constructor
  135.         
  136.     virtual ~TLetterTabber();
  137.         // Destructor
  138.     
  139.     void ILetterTabber(Boolean recursive, TLetter *itsLetter);
  140.     
  141.     virtual void FindSubViewTargets(TView* parent, Boolean tabBackward); //override
  142. };
  143.  
  144. //----------------------------------------------------------------------------------------
  145.  
  146. // Globals for this unit
  147.  
  148. extern void InitUMailerView();
  149.     // Sets up proc pointers and does general initialization
  150.  
  151. extern PrepareMailerForDrawingUPP gMacAppPrepareMailerForDrawingProc;
  152.  
  153. extern FrontWindowUPP gFrontWindowUPP;
  154.  
  155. #endif // qPowerTalk
  156.  
  157. #endif // __UMAILERVIEW__
  158.